Intelligent control